Optimal. Leaf size=223 \[ -\frac {\left (a^2-b^2\right )^3 \cos (c+d x)}{a^7 d}-\frac {b \left (3 a^4-3 a^2 b^2+b^4\right ) \cos ^2(c+d x)}{2 a^6 d}+\frac {\left (3 a^4-3 a^2 b^2+b^4\right ) \cos ^3(c+d x)}{3 a^5 d}+\frac {b \left (3 a^2-b^2\right ) \cos ^4(c+d x)}{4 a^4 d}-\frac {\left (3 a^2-b^2\right ) \cos ^5(c+d x)}{5 a^3 d}-\frac {b \cos ^6(c+d x)}{6 a^2 d}+\frac {\cos ^7(c+d x)}{7 a d}+\frac {b \left (a^2-b^2\right )^3 \log (b+a \cos (c+d x))}{a^8 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.18, antiderivative size = 223, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3957, 2916, 12,
786} \begin {gather*} -\frac {b \cos ^6(c+d x)}{6 a^2 d}+\frac {b \left (a^2-b^2\right )^3 \log (a \cos (c+d x)+b)}{a^8 d}-\frac {\left (a^2-b^2\right )^3 \cos (c+d x)}{a^7 d}+\frac {b \left (3 a^2-b^2\right ) \cos ^4(c+d x)}{4 a^4 d}-\frac {\left (3 a^2-b^2\right ) \cos ^5(c+d x)}{5 a^3 d}-\frac {b \left (3 a^4-3 a^2 b^2+b^4\right ) \cos ^2(c+d x)}{2 a^6 d}+\frac {\left (3 a^4-3 a^2 b^2+b^4\right ) \cos ^3(c+d x)}{3 a^5 d}+\frac {\cos ^7(c+d x)}{7 a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 786
Rule 2916
Rule 3957
Rubi steps
\begin {align*} \int \frac {\sin ^7(c+d x)}{a+b \sec (c+d x)} \, dx &=-\int \frac {\cos (c+d x) \sin ^7(c+d x)}{-b-a \cos (c+d x)} \, dx\\ &=\frac {\text {Subst}\left (\int \frac {x \left (a^2-x^2\right )^3}{a (-b+x)} \, dx,x,-a \cos (c+d x)\right )}{a^7 d}\\ &=\frac {\text {Subst}\left (\int \frac {x \left (a^2-x^2\right )^3}{-b+x} \, dx,x,-a \cos (c+d x)\right )}{a^8 d}\\ &=\frac {\text {Subst}\left (\int \left (\left (a^2-b^2\right )^3+\frac {b \left (-a^2+b^2\right )^3}{b-x}-b \left (3 a^4-3 a^2 b^2+b^4\right ) x-\left (3 a^4-3 a^2 b^2+b^4\right ) x^2-b \left (-3 a^2+b^2\right ) x^3+\left (3 a^2-b^2\right ) x^4-b x^5-x^6\right ) \, dx,x,-a \cos (c+d x)\right )}{a^8 d}\\ &=-\frac {\left (a^2-b^2\right )^3 \cos (c+d x)}{a^7 d}-\frac {b \left (3 a^4-3 a^2 b^2+b^4\right ) \cos ^2(c+d x)}{2 a^6 d}+\frac {\left (3 a^4-3 a^2 b^2+b^4\right ) \cos ^3(c+d x)}{3 a^5 d}+\frac {b \left (3 a^2-b^2\right ) \cos ^4(c+d x)}{4 a^4 d}-\frac {\left (3 a^2-b^2\right ) \cos ^5(c+d x)}{5 a^3 d}-\frac {b \cos ^6(c+d x)}{6 a^2 d}+\frac {\cos ^7(c+d x)}{7 a d}+\frac {b \left (a^2-b^2\right )^3 \log (b+a \cos (c+d x))}{a^8 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.96, size = 282, normalized size = 1.26 \begin {gather*} \frac {-105 a \left (35 a^6-152 a^4 b^2+176 a^2 b^4-64 b^6\right ) \cos (c+d x)-105 \left (29 a^6 b-40 a^4 b^3+16 a^2 b^5\right ) \cos (2 (c+d x))+735 a^7 \cos (3 (c+d x))-1260 a^5 b^2 \cos (3 (c+d x))+560 a^3 b^4 \cos (3 (c+d x))+420 a^6 b \cos (4 (c+d x))-210 a^4 b^3 \cos (4 (c+d x))-147 a^7 \cos (5 (c+d x))+84 a^5 b^2 \cos (5 (c+d x))-35 a^6 b \cos (6 (c+d x))+15 a^7 \cos (7 (c+d x))+6720 a^6 b \log (b+a \cos (c+d x))-20160 a^4 b^3 \log (b+a \cos (c+d x))+20160 a^2 b^5 \log (b+a \cos (c+d x))-6720 b^7 \log (b+a \cos (c+d x))}{6720 a^8 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 275, normalized size = 1.23 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 224, normalized size = 1.00 \begin {gather*} \frac {\frac {60 \, a^{6} \cos \left (d x + c\right )^{7} - 70 \, a^{5} b \cos \left (d x + c\right )^{6} - 84 \, {\left (3 \, a^{6} - a^{4} b^{2}\right )} \cos \left (d x + c\right )^{5} + 105 \, {\left (3 \, a^{5} b - a^{3} b^{3}\right )} \cos \left (d x + c\right )^{4} + 140 \, {\left (3 \, a^{6} - 3 \, a^{4} b^{2} + a^{2} b^{4}\right )} \cos \left (d x + c\right )^{3} - 210 \, {\left (3 \, a^{5} b - 3 \, a^{3} b^{3} + a b^{5}\right )} \cos \left (d x + c\right )^{2} - 420 \, {\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} \cos \left (d x + c\right )}{a^{7}} + \frac {420 \, {\left (a^{6} b - 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} - b^{7}\right )} \log \left (a \cos \left (d x + c\right ) + b\right )}{a^{8}}}{420 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.50, size = 222, normalized size = 1.00 \begin {gather*} \frac {60 \, a^{7} \cos \left (d x + c\right )^{7} - 70 \, a^{6} b \cos \left (d x + c\right )^{6} - 84 \, {\left (3 \, a^{7} - a^{5} b^{2}\right )} \cos \left (d x + c\right )^{5} + 105 \, {\left (3 \, a^{6} b - a^{4} b^{3}\right )} \cos \left (d x + c\right )^{4} + 140 \, {\left (3 \, a^{7} - 3 \, a^{5} b^{2} + a^{3} b^{4}\right )} \cos \left (d x + c\right )^{3} - 210 \, {\left (3 \, a^{6} b - 3 \, a^{4} b^{3} + a^{2} b^{5}\right )} \cos \left (d x + c\right )^{2} - 420 \, {\left (a^{7} - 3 \, a^{5} b^{2} + 3 \, a^{3} b^{4} - a b^{6}\right )} \cos \left (d x + c\right ) + 420 \, {\left (a^{6} b - 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} - b^{7}\right )} \log \left (a \cos \left (d x + c\right ) + b\right )}{420 \, a^{8} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 1559 vs.
\(2 (211) = 422\).
time = 0.49, size = 1559, normalized size = 6.99 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.16, size = 249, normalized size = 1.12 \begin {gather*} \frac {{\cos \left (c+d\,x\right )}^3\,\left (\frac {1}{a}-\frac {b^2\,\left (\frac {1}{a}-\frac {b^2}{3\,a^3}\right )}{a^2}\right )-{\cos \left (c+d\,x\right )}^5\,\left (\frac {3}{5\,a}-\frac {b^2}{5\,a^3}\right )-\cos \left (c+d\,x\right )\,\left (\frac {1}{a}-\frac {b^2\,\left (\frac {3}{a}-\frac {b^2\,\left (\frac {3}{a}-\frac {b^2}{a^3}\right )}{a^2}\right )}{a^2}\right )+\frac {{\cos \left (c+d\,x\right )}^7}{7\,a}+\frac {\ln \left (b+a\,\cos \left (c+d\,x\right )\right )\,\left (a^6\,b-3\,a^4\,b^3+3\,a^2\,b^5-b^7\right )}{a^8}-\frac {b\,{\cos \left (c+d\,x\right )}^6}{6\,a^2}-\frac {b\,{\cos \left (c+d\,x\right )}^2\,\left (\frac {3}{a}-\frac {b^2\,\left (\frac {3}{a}-\frac {b^2}{a^3}\right )}{a^2}\right )}{2\,a}+\frac {b\,{\cos \left (c+d\,x\right )}^4\,\left (\frac {3}{a}-\frac {b^2}{a^3}\right )}{4\,a}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________